package com.vslimit.mapper;

import com.vslimit.dto.VoaCatDTO;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by IntelliJ IDEA.
 * User: vslimit
 * Date: 12-4-4
 * Time: 上午12:44
 * To change this template use File | Settings | File Templates.
 */
public class VoaCatMapper implements RowMapper {
    @Override
    public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        VoaCatDTO voaCatDTO = new VoaCatDTO();
        voaCatDTO.setId(rs.getInt("id"));
        voaCatDTO.setName(rs.getString("name"));
        voaCatDTO.setPid(rs.getInt("pid"));
        voaCatDTO.setDescription(rs.getString("description"));
        voaCatDTO.setStatus(rs.getString("status"));
        return voaCatDTO;
    }
}
